3.56 \(\int \frac{\tanh ^{-1}(a+b x)}{c+\frac{d}{x}} \, dx\)

Optimal. Leaf size=186 \[ \frac{d \text{PolyLog}\left (2,\frac{c (-a-b x+1)}{-a c+b d+c}\right )}{2 c^2}-\frac{d \text{PolyLog}\left (2,\frac{c (a+b x+1)}{a c-b d+c}\right )}{2 c^2}+\frac{d \log (-a-b x+1) \log \left (\frac{b (c x+d)}{-a c+b d+c}\right )}{2 c^2}-\frac{d \log (a+b x+1) \log \left (-\frac{b (c x+d)}{a c-b d+c}\right )}{2 c^2}+\frac{(-a-b x+1) \log (-a-b x+1)}{2 b c}+\frac{(a+b x+1) \log (a+b x+1)}{2 b c} \]

[Out]

((1 - a - b*x)*Log[1 - a - b*x])/(2*b*c) + ((1 + a + b*x)*Log[1 + a + b*x])/(2*b*c) - (d*Log[1 + a + b*x]*Log[
-((b*(d + c*x))/(c + a*c - b*d))])/(2*c^2) + (d*Log[1 - a - b*x]*Log[(b*(d + c*x))/(c - a*c + b*d)])/(2*c^2) +
 (d*PolyLog[2, (c*(1 - a - b*x))/(c - a*c + b*d)])/(2*c^2) - (d*PolyLog[2, (c*(1 + a + b*x))/(c + a*c - b*d)])
/(2*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.237145, antiderivative size = 186, normalized size of antiderivative = 1., number of steps used = 15, number of rules used = 7, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.438, Rules used = {6115, 2409, 2389, 2295, 2394, 2393, 2391} \[ \frac{d \text{PolyLog}\left (2,\frac{c (-a-b x+1)}{-a c+b d+c}\right )}{2 c^2}-\frac{d \text{PolyLog}\left (2,\frac{c (a+b x+1)}{a c-b d+c}\right )}{2 c^2}+\frac{d \log (-a-b x+1) \log \left (\frac{b (c x+d)}{-a c+b d+c}\right )}{2 c^2}-\frac{d \log (a+b x+1) \log \left (-\frac{b (c x+d)}{a c-b d+c}\right )}{2 c^2}+\frac{(-a-b x+1) \log (-a-b x+1)}{2 b c}+\frac{(a+b x+1) \log (a+b x+1)}{2 b c} \]

Antiderivative was successfully verified.

[In]

Int[ArcTanh[a + b*x]/(c + d/x),x]

[Out]

((1 - a - b*x)*Log[1 - a - b*x])/(2*b*c) + ((1 + a + b*x)*Log[1 + a + b*x])/(2*b*c) - (d*Log[1 + a + b*x]*Log[
-((b*(d + c*x))/(c + a*c - b*d))])/(2*c^2) + (d*Log[1 - a - b*x]*Log[(b*(d + c*x))/(c - a*c + b*d)])/(2*c^2) +
 (d*PolyLog[2, (c*(1 - a - b*x))/(c - a*c + b*d)])/(2*c^2) - (d*PolyLog[2, (c*(1 + a + b*x))/(c + a*c - b*d)])
/(2*c^2)

Rule 6115

Int[ArcTanh[(c_) + (d_.)*(x_)]/((e_) + (f_.)*(x_)^(n_.)), x_Symbol] :> Dist[1/2, Int[Log[1 + c + d*x]/(e + f*x
^n), x], x] - Dist[1/2, Int[Log[1 - c - d*x]/(e + f*x^n), x], x] /; FreeQ[{c, d, e, f}, x] && RationalQ[n]

Rule 2409

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_)^(r_))^(q_.), x_Symbol] :> In
t[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (f + g*x^r)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, r}, x]
 && IGtQ[p, 0] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[r] && NeQ[r, 1]))

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\tanh ^{-1}(a+b x)}{c+\frac{d}{x}} \, dx &=-\left (\frac{1}{2} \int \frac{\log (1-a-b x)}{c+\frac{d}{x}} \, dx\right )+\frac{1}{2} \int \frac{\log (1+a+b x)}{c+\frac{d}{x}} \, dx\\ &=-\left (\frac{1}{2} \int \left (\frac{\log (1-a-b x)}{c}-\frac{d \log (1-a-b x)}{c (d+c x)}\right ) \, dx\right )+\frac{1}{2} \int \left (\frac{\log (1+a+b x)}{c}-\frac{d \log (1+a+b x)}{c (d+c x)}\right ) \, dx\\ &=-\frac{\int \log (1-a-b x) \, dx}{2 c}+\frac{\int \log (1+a+b x) \, dx}{2 c}+\frac{d \int \frac{\log (1-a-b x)}{d+c x} \, dx}{2 c}-\frac{d \int \frac{\log (1+a+b x)}{d+c x} \, dx}{2 c}\\ &=-\frac{d \log (1+a+b x) \log \left (-\frac{b (d+c x)}{c+a c-b d}\right )}{2 c^2}+\frac{d \log (1-a-b x) \log \left (\frac{b (d+c x)}{c-a c+b d}\right )}{2 c^2}+\frac{\operatorname{Subst}(\int \log (x) \, dx,x,1-a-b x)}{2 b c}+\frac{\operatorname{Subst}(\int \log (x) \, dx,x,1+a+b x)}{2 b c}+\frac{(b d) \int \frac{\log \left (-\frac{b (d+c x)}{-(1-a) c-b d}\right )}{1-a-b x} \, dx}{2 c^2}+\frac{(b d) \int \frac{\log \left (\frac{b (d+c x)}{-(1+a) c+b d}\right )}{1+a+b x} \, dx}{2 c^2}\\ &=\frac{(1-a-b x) \log (1-a-b x)}{2 b c}+\frac{(1+a+b x) \log (1+a+b x)}{2 b c}-\frac{d \log (1+a+b x) \log \left (-\frac{b (d+c x)}{c+a c-b d}\right )}{2 c^2}+\frac{d \log (1-a-b x) \log \left (\frac{b (d+c x)}{c-a c+b d}\right )}{2 c^2}-\frac{d \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{c x}{-(1-a) c-b d}\right )}{x} \, dx,x,1-a-b x\right )}{2 c^2}+\frac{d \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{c x}{-(1+a) c+b d}\right )}{x} \, dx,x,1+a+b x\right )}{2 c^2}\\ &=\frac{(1-a-b x) \log (1-a-b x)}{2 b c}+\frac{(1+a+b x) \log (1+a+b x)}{2 b c}-\frac{d \log (1+a+b x) \log \left (-\frac{b (d+c x)}{c+a c-b d}\right )}{2 c^2}+\frac{d \log (1-a-b x) \log \left (\frac{b (d+c x)}{c-a c+b d}\right )}{2 c^2}+\frac{d \text{Li}_2\left (\frac{c (1-a-b x)}{c-a c+b d}\right )}{2 c^2}-\frac{d \text{Li}_2\left (\frac{c (1+a+b x)}{c+a c-b d}\right )}{2 c^2}\\ \end{align*}

Mathematica [C]  time = 3.92718, size = 759, normalized size = 4.08 \[ \frac{b d (b d-a c) \text{PolyLog}\left (2,\exp \left (2 \left (\tanh ^{-1}\left (a-\frac{b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )\right )+b d (a c-b d) \text{PolyLog}\left (2,-e^{-2 \tanh ^{-1}(a+b x)}\right )+b c d \sqrt{-a^2+\frac{2 a b d}{c}-\frac{b^2 d^2}{c^2}+1} \tanh ^{-1}(a+b x)^2 e^{\tanh ^{-1}\left (a-\frac{b d}{c}\right )}-2 a^2 c^2 \tanh ^{-1}(a+b x)+2 b^2 d^2 \tanh ^{-1}\left (a-\frac{b d}{c}\right ) \log \left (1-\exp \left (2 \left (\tanh ^{-1}\left (a-\frac{b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )\right )-2 b^2 d^2 \tanh ^{-1}(a+b x) \log \left (1-\exp \left (2 \left (\tanh ^{-1}\left (a-\frac{b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )\right )+2 b^2 d^2 \tanh ^{-1}(a+b x) \tanh ^{-1}\left (a-\frac{b d}{c}\right )-2 b^2 d^2 \tanh ^{-1}\left (a-\frac{b d}{c}\right ) \log \left (-i \sinh \left (\tanh ^{-1}\left (a-\frac{b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )+2 b^2 c d x \tanh ^{-1}(a+b x)-i \pi b^2 d^2 \log \left (\frac{1}{\sqrt{1-(a+b x)^2}}\right )+b^2 d^2 \tanh ^{-1}(a+b x)^2-i \pi b^2 d^2 \tanh ^{-1}(a+b x)+2 b^2 d^2 \tanh ^{-1}(a+b x) \log \left (e^{-2 \tanh ^{-1}(a+b x)}+1\right )+i \pi b^2 d^2 \log \left (e^{2 \tanh ^{-1}(a+b x)}+1\right )+2 a c^2 \log \left (\frac{1}{\sqrt{1-(a+b x)^2}}\right )-2 a b c^2 x \tanh ^{-1}(a+b x)-2 a b c d \tanh ^{-1}\left (a-\frac{b d}{c}\right ) \log \left (1-\exp \left (2 \left (\tanh ^{-1}\left (a-\frac{b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )\right )+2 a b c d \tanh ^{-1}(a+b x) \log \left (1-\exp \left (2 \left (\tanh ^{-1}\left (a-\frac{b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )\right )-2 b c d \log \left (\frac{1}{\sqrt{1-(a+b x)^2}}\right )+i \pi a b c d \log \left (\frac{1}{\sqrt{1-(a+b x)^2}}\right )-a b c d \tanh ^{-1}(a+b x)^2-b c d \tanh ^{-1}(a+b x)^2+2 a b c d \tanh ^{-1}(a+b x)-2 a b c d \tanh ^{-1}(a+b x) \tanh ^{-1}\left (a-\frac{b d}{c}\right )+i \pi a b c d \tanh ^{-1}(a+b x)-2 a b c d \tanh ^{-1}(a+b x) \log \left (e^{-2 \tanh ^{-1}(a+b x)}+1\right )-i \pi a b c d \log \left (e^{2 \tanh ^{-1}(a+b x)}+1\right )+2 a b c d \tanh ^{-1}\left (a-\frac{b d}{c}\right ) \log \left (-i \sinh \left (\tanh ^{-1}\left (a-\frac{b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )}{2 b c^2 (b d-a c)} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[ArcTanh[a + b*x]/(c + d/x),x]

[Out]

(-2*a^2*c^2*ArcTanh[a + b*x] + 2*a*b*c*d*ArcTanh[a + b*x] + I*a*b*c*d*Pi*ArcTanh[a + b*x] - I*b^2*d^2*Pi*ArcTa
nh[a + b*x] - 2*a*b*c^2*x*ArcTanh[a + b*x] + 2*b^2*c*d*x*ArcTanh[a + b*x] - 2*a*b*c*d*ArcTanh[a - (b*d)/c]*Arc
Tanh[a + b*x] + 2*b^2*d^2*ArcTanh[a - (b*d)/c]*ArcTanh[a + b*x] - b*c*d*ArcTanh[a + b*x]^2 - a*b*c*d*ArcTanh[a
 + b*x]^2 + b^2*d^2*ArcTanh[a + b*x]^2 + b*c*d*Sqrt[1 - a^2 + (2*a*b*d)/c - (b^2*d^2)/c^2]*E^ArcTanh[a - (b*d)
/c]*ArcTanh[a + b*x]^2 - 2*a*b*c*d*ArcTanh[a - (b*d)/c]*Log[1 - E^(2*(ArcTanh[a - (b*d)/c] - ArcTanh[a + b*x])
)] + 2*b^2*d^2*ArcTanh[a - (b*d)/c]*Log[1 - E^(2*(ArcTanh[a - (b*d)/c] - ArcTanh[a + b*x]))] + 2*a*b*c*d*ArcTa
nh[a + b*x]*Log[1 - E^(2*(ArcTanh[a - (b*d)/c] - ArcTanh[a + b*x]))] - 2*b^2*d^2*ArcTanh[a + b*x]*Log[1 - E^(2
*(ArcTanh[a - (b*d)/c] - ArcTanh[a + b*x]))] - 2*a*b*c*d*ArcTanh[a + b*x]*Log[1 + E^(-2*ArcTanh[a + b*x])] + 2
*b^2*d^2*ArcTanh[a + b*x]*Log[1 + E^(-2*ArcTanh[a + b*x])] - I*a*b*c*d*Pi*Log[1 + E^(2*ArcTanh[a + b*x])] + I*
b^2*d^2*Pi*Log[1 + E^(2*ArcTanh[a + b*x])] + 2*a*c^2*Log[1/Sqrt[1 - (a + b*x)^2]] - 2*b*c*d*Log[1/Sqrt[1 - (a
+ b*x)^2]] + I*a*b*c*d*Pi*Log[1/Sqrt[1 - (a + b*x)^2]] - I*b^2*d^2*Pi*Log[1/Sqrt[1 - (a + b*x)^2]] + 2*a*b*c*d
*ArcTanh[a - (b*d)/c]*Log[(-I)*Sinh[ArcTanh[a - (b*d)/c] - ArcTanh[a + b*x]]] - 2*b^2*d^2*ArcTanh[a - (b*d)/c]
*Log[(-I)*Sinh[ArcTanh[a - (b*d)/c] - ArcTanh[a + b*x]]] + b*d*(-(a*c) + b*d)*PolyLog[2, E^(2*(ArcTanh[a - (b*
d)/c] - ArcTanh[a + b*x]))] + b*d*(a*c - b*d)*PolyLog[2, -E^(-2*ArcTanh[a + b*x])])/(2*b*c^2*(-(a*c) + b*d))

________________________________________________________________________________________

Maple [A]  time = 0.197, size = 297, normalized size = 1.6 \begin{align*}{\frac{{\it Artanh} \left ( bx+a \right ) x}{c}}+{\frac{{\it Artanh} \left ( bx+a \right ) a}{bc}}-{\frac{{\it Artanh} \left ( bx+a \right ) d\ln \left ( c \left ( bx+a \right ) -ac+bd \right ) }{{c}^{2}}}-{\frac{d\ln \left ( c \left ( bx+a \right ) -ac+bd \right ) }{2\,{c}^{2}}\ln \left ({\frac{c \left ( bx+a \right ) -c}{ac-bd-c}} \right ) }-{\frac{d}{2\,{c}^{2}}{\it dilog} \left ({\frac{c \left ( bx+a \right ) -c}{ac-bd-c}} \right ) }+{\frac{d\ln \left ( c \left ( bx+a \right ) -ac+bd \right ) }{2\,{c}^{2}}\ln \left ({\frac{c \left ( bx+a \right ) +c}{ac-bd+c}} \right ) }+{\frac{d}{2\,{c}^{2}}{\it dilog} \left ({\frac{c \left ( bx+a \right ) +c}{ac-bd+c}} \right ) }+{\frac{\ln \left ({a}^{2}{c}^{2}-2\,abcd+{b}^{2}{d}^{2}+2\, \left ( c \left ( bx+a \right ) -ac+bd \right ) ac-2\, \left ( c \left ( bx+a \right ) -ac+bd \right ) bd+ \left ( c \left ( bx+a \right ) -ac+bd \right ) ^{2}-{c}^{2} \right ) }{2\,bc}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctanh(b*x+a)/(c+d/x),x)

[Out]

arctanh(b*x+a)/c*x+1/b*arctanh(b*x+a)/c*a-arctanh(b*x+a)/c^2*d*ln(c*(b*x+a)-a*c+b*d)-1/2/c^2*d*ln(c*(b*x+a)-a*
c+b*d)*ln((c*(b*x+a)-c)/(a*c-b*d-c))-1/2/c^2*d*dilog((c*(b*x+a)-c)/(a*c-b*d-c))+1/2/c^2*d*ln(c*(b*x+a)-a*c+b*d
)*ln((c*(b*x+a)+c)/(a*c-b*d+c))+1/2/c^2*d*dilog((c*(b*x+a)+c)/(a*c-b*d+c))+1/2/b/c*ln(a^2*c^2-2*a*b*c*d+b^2*d^
2+2*(c*(b*x+a)-a*c+b*d)*a*c-2*(c*(b*x+a)-a*c+b*d)*b*d+(c*(b*x+a)-a*c+b*d)^2-c^2)

________________________________________________________________________________________

Maxima [A]  time = 0.961282, size = 259, normalized size = 1.39 \begin{align*} \frac{1}{2} \, b{\left (\frac{{\left (\log \left (c x + d\right ) \log \left (\frac{b c x + b d}{a c - b d + c} + 1\right ) +{\rm Li}_2\left (-\frac{b c x + b d}{a c - b d + c}\right )\right )} d}{b c^{2}} - \frac{{\left (\log \left (c x + d\right ) \log \left (\frac{b c x + b d}{a c - b d - c} + 1\right ) +{\rm Li}_2\left (-\frac{b c x + b d}{a c - b d - c}\right )\right )} d}{b c^{2}} + \frac{{\left (a + 1\right )} \log \left (b x + a + 1\right )}{b^{2} c} - \frac{{\left (a - 1\right )} \log \left (b x + a - 1\right )}{b^{2} c}\right )} +{\left (\frac{x}{c} - \frac{d \log \left (c x + d\right )}{c^{2}}\right )} \operatorname{artanh}\left (b x + a\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(b*x+a)/(c+d/x),x, algorithm="maxima")

[Out]

1/2*b*((log(c*x + d)*log((b*c*x + b*d)/(a*c - b*d + c) + 1) + dilog(-(b*c*x + b*d)/(a*c - b*d + c)))*d/(b*c^2)
 - (log(c*x + d)*log((b*c*x + b*d)/(a*c - b*d - c) + 1) + dilog(-(b*c*x + b*d)/(a*c - b*d - c)))*d/(b*c^2) + (
a + 1)*log(b*x + a + 1)/(b^2*c) - (a - 1)*log(b*x + a - 1)/(b^2*c)) + (x/c - d*log(c*x + d)/c^2)*arctanh(b*x +
 a)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{x \operatorname{artanh}\left (b x + a\right )}{c x + d}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(b*x+a)/(c+d/x),x, algorithm="fricas")

[Out]

integral(x*arctanh(b*x + a)/(c*x + d), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x \operatorname{atanh}{\left (a + b x \right )}}{c x + d}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atanh(b*x+a)/(c+d/x),x)

[Out]

Integral(x*atanh(a + b*x)/(c*x + d), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{artanh}\left (b x + a\right )}{c + \frac{d}{x}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(b*x+a)/(c+d/x),x, algorithm="giac")

[Out]

integrate(arctanh(b*x + a)/(c + d/x), x)